home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / netbsd / tools / cross-compiling / cross.readme < prev   
Text File  |  1995-08-03  |  3KB  |  73 lines

  1. August 3, 1995
  2.  
  3. BEWARE THOSE WHO ENTER HERE.....
  4. ================================
  5.  
  6. This directory contains executables and sources to my own cross compilation
  7. environment from Sparc SunOS 4.1.3_U1 to NetBSD-current. I'd like to
  8. remind *everyone* trying this for him/herself, that we're far from having the
  9. right hooks in the NetBSD sources to automate this process. A lot of what
  10. is in this directory has been created by trial-and-error, although the result
  11. seems to work just fine (I'm compiling all my kernels this way, as well as
  12. system recompiles from time to time). You'll run into problems with programs
  13. such as NetBSD /bin/sh that create helper programs that are run to generate
  14. further source. Unless you tweak those sources, you won't be able to 
  15. crosscompile them (I just skip them usually;-)).
  16.  
  17. One thing to watch out when compiling kernels (same problem actually as with
  18. /bin/sh): the make process wants to create "assym.s" by running a program
  19. just compiled. I usually fix this problem by starting the "make" on the
  20. native NetBSD box, and killing the make after it created assym.s. You might
  21. come up with a better, nicer solution;-)
  22.  
  23. The gcc included is a modified 2.6.3, sources are in cross-gcc263-src.tar.gz.
  24. There are minor changes in netbsd.h and more changes in the pic generation
  25. code, all m68k dependant though.
  26.  
  27. Oh, if you want to recompile binaries from the provided sources.. What
  28. I usually do is:
  29.    /usr/local/NetBSD/cross/m68k/bin/make 
  30.     CC='/usr/local/bin/gcc -I/usr/local/NetBSD/cross/sun-include'
  31. Of course you could also rewrite the Makefiles to do just that...
  32.  
  33. To compile something in the NetBSD environment, I'm using (bash):
  34. $ export PATH=/usr/local/NetBSD/cross/m68k/bin:/usr/local/bin:$PATH
  35. $ make
  36.  
  37. That way, the system picks all the NetBSD tools automatically because they
  38. appear first in the $PATH.
  39.  
  40. Here's my directory structure, I'd bet gcc and other stuff depend on it:
  41.  
  42. /usr/local/NetBSD:    contains a NetBSD tree, full with source in usr/src,
  43.             headers in usr/include, etc.
  44. /usr/local/NetBSD/cross/m68k/bin:    cross binaries
  45. /usr/local/NetBSD/cross/share/mk:    cross mk rules
  46. /usr/local/m68k-cbm-netbsd/bin: -> /usr/local/NetBSD/cross/m68k/bin
  47. /usr/local/m68k-cbm-netbsd/include: -> /usr/local/NetBSD/usr/include
  48. /usr/local/m68k-cbm-netbsd/lib: -> /usr/local/NetBSD/usr/lib
  49. /usr/local/lib/gcc-lib/m68k-cbm-netbsd/2.6.3: gcc compiler binaries
  50.  
  51. Ok, to finish this up, I'd like to remind everyone:
  52. *****************************************************************************
  53. If you don't carry some pioneer spirit in yourself, if you expect to
  54. install-and-run, this suit is definitely NOT for you. You have to be ready
  55. to do some own investigations why certain things might not work the way
  56. they're supposed to. I'm ready to help within certain limits, I really don't
  57. have time though to completely walk you thru your own set up of your new
  58. private Cray or whatever.
  59. *****************************************************************************
  60.  
  61. For people trying to cross-compile from little-endian systems to big-endian
  62. or vice versa: be careful! I think there might be some hidden traps in both
  63. the assembler and the linker. You were warned... ;-)
  64.  
  65.  
  66. You can contact me at "mw@eunet.ch", I'll try to keep copies on 
  67. ftp.eunet.ch:/software/os/bsd/NetBSD/cross-current as uptodate as possible.
  68.  
  69. Good luck, and may the source be with you;-)
  70.  
  71. -Markus Wild
  72.  
  73.